Fix potential deadlock in PL011 init function
authorJuan Castillo <[email protected]>
Tue, 23 Feb 2016 17:12:18 +0000 (17:12 +0000)
committerJuan Castillo <[email protected]>
Wed, 24 Feb 2016 10:05:11 +0000 (10:05 +0000)
commit8dadabd288be998e7930ce81e409f4949631056b
tree2b5ee52240aea7b4afecf6fcffce1e5280d41cd4
parent85df7e44ce3974e2c78d99e6ea31f047de6de445
Fix potential deadlock in PL011 init function

The PL011 initialization function disables the UART, flushes the FIFO
and waits for the current character to be transmitted before applying
the configuration and enabling the UART. This waiting might result in
a deadlock if the FIFO is disabled while another CPU is printing a
message since the flush of FIFO will never finish.

This patch fixes the problem by removing the flush operation and the
loop for last character completion from the initialization function.
The UART is disabled, configured and enabled again.

Change-Id: I1ca0b6bd9f352c12856f10f174a9f6eaca3ab4ea
drivers/arm/pl011/pl011_console.S